﻿
using Shared.Domain;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace ProductManagement.Domain
{
    /// <summary>
    /// 公共规格
    /// </summary>

    public class ProSpec : LongEntityOnlyDelete
    {

        /// <summary>
        /// 绑定的分类Id
        /// </summary>
        public long CategoryId { get; private set; }

        /// <summary>
        /// 规格名称
        /// </summary>
        [MaxLength(20)]
        public string Name { get; private set; } = "";


        /// <summary>
        /// 是否类别继承
        /// </summary>
        public bool Isherit { get; private set; } = true;
        /// <summary>
        /// 导航属性
        /// </summary>
        public List<ProSpecValue> SpecItems { get; private set; } = new();
    }
}
